package com.chii.user.service;

import com.chii.user.po.User;
import com.chii.user.po.UserRoleRel;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface UserService {
    int updateLoginTime(String username);

    @Transactional(rollbackFor = Exception.class)
    int insertNewUser(String username, String password, int role);

    User getUser(String username);



    int insertNewRoleForUser(Integer userId,Integer roleId);

    int delRoleForUser(Integer userId,Integer roleId);

    List<UserRoleRel> getRoleForUser(Integer userId);

}
